﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knight.ObjectFactory
{
    /// <summary>
    /// 对象获取方法 
    /// </summary>
    class ObjectFunc
    {
        public ObjectFunc(Func<object> func, bool isSingleton = false)
        {
            this.Func = func;
            this.IsSingleton = isSingleton;
        }

        /// <summary>
        /// 对象获取方法
        /// </summary>
        public Func<object> Func { get; private set; }
        /// <summary>
        /// 是否是单例模式
        /// </summary>
        public bool IsSingleton { get; private set; }
    }
}
